package com.linghang.wusthelper.controller.volunteer;

import com.linghang.wusthelper.annotation.AuthenToken;
import com.linghang.wusthelper.common.ServerResponse;
import com.linghang.wusthelper.service.VolunteerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @uthor Fegert
 * @Date 2020/3/1 18:36
 */
@RestController
@RequestMapping(path = "/volunteer")
public class VolunteerController {
    @Autowired
    private VolunteerService volunteerService;
    @GetMapping(path = "/getInfo")
    @AuthenToken//标明接口需要
    public ServerResponse getVolunteerInfo(@RequestHeader(value = "token", required = true) String token) {
       return volunteerService.getInfo(token);
    }

}
